<template>
	<view>
		<!-- 设备档案 -->
		<uni-list>
			<uni-swipe-action ref="swipeAction">
				<uni-swipe-action-item v-for="(item, index) in tableData" :right-options="options1" :key="item.id">
					<uni-list-item :title="item.name" :note="item.createTime" showArrow clickable
						:rightText="item.planRoute" @click="ToDetail(item)" />
				</uni-swipe-action-item>
			</uni-swipe-action>
		</uni-list>
	</view>
</template>

<script>
	import store from '@/store/index.js';
	import {
		getDeviceInfoAll
	} from '@/api/system/user.js';
	export default {
		data() {
			return {
				tableData: [],
			};
		},
		onLoad() {
			this.getDeviceList();
		},
		methods: {
			getDeviceList() {
				getDeviceInfoAll().then(response => {
					this.tableData = response.data;
				})
			},
			ToDetail(item) {
			/* 	uni.navigateTo({
					url: `/pages/work/EquipmentArchives/detail?id=${item.id}`
				}); */
				this.$tab.navigateTo('/pages/work/EquipmentArchives/detail');
				store.state.CusImform = item;
				console.log('store.state.CusImform:', store.state.CusImform);
			},
		}
	}
</script>

<style lang="scss">

</style>